package com.dhl.command.tv;

import com.dhl.command.Command;

/**
 * @title: TVOffCommand
 * @Author danghailiang
 * @Date: 2022/8/20 12:34
 * @Version 1.0
 */
public class TVOffCommand implements Command {

    private TVReceiver tvReceiver;
    public TVOffCommand(TVReceiver tvReceiver){
        super();
        this.tvReceiver = tvReceiver;
    }

    @Override
    public void execute() {
        tvReceiver.off();
    }

    @Override
    public void undo() {
        tvReceiver.on();
    }
}
